package eerbaar.expression;

import eerbaar.context.IParams;
import eerbaar.shared.service.ServiceFactory;

public class ExpressionFactory {

    public static IExpression createExpression(String name, IParams params) {

        IExpressionService service = ServiceFactory
                .getService(IExpressionService.class);
        IExpression r = service.createExpression(name, params);
        r.setParams(params);
        return r;
    }

    public static void registerExpression(String name,
            IExpressionFactory expression) {

        IExpressionService service = ServiceFactory
                .getService(IExpressionService.class);
        service.registerExpression(name, expression);
    }
}
